﻿<Window x:Class="ScreenWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Nicevote" Height="480" Width="640"
        FontSize="22"
        FontWeight="Bold"
        Topmost="True"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent"
        >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <!--<ListBox ItemsSource="{Binding VotesView}" Margin="5">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Path=No, StringFormat=0:}" Margin="0 0 3 0" />
                        <TextBlock Text="{Binding Text}" Margin="0 0 3 0" />
                        <TextBlock Text="{Binding Path=Count, StringFormat=0票}" />
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>-->
        
        <StackPanel Orientation="Horizontal">
            <Image Source="favicon.png" VerticalAlignment="Center" Width="16" Height="16"
                   MouseLeftButtonDown="Image_MouseLeftButtonDown"/>
            <TextBlock Text="{Binding VoteTitle}" VerticalAlignment="Center" Margin="3 0 0 0"
                       Foreground="White"> 
                <TextBlock.BitmapEffect>
                    <OuterGlowBitmapEffect
                        GlowSize="5.0"
                        GlowColor="Black"
                        Opacity="1.0"/>
                </TextBlock.BitmapEffect>
            </TextBlock>
        </StackPanel>
        
        
        <ItemsControl Grid.Row="1" ItemsSource="{Binding VotesView}" Margin="5" >
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <StackPanel />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <WrapPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Path=No, StringFormat=0:}" Margin="0 0 3 0"
                                   Foreground="White">
                            <TextBlock.BitmapEffect>
                                <OuterGlowBitmapEffect
                                    GlowSize="5.0"
                                    GlowColor="Black"
                                    Opacity="1.0"/>
                            </TextBlock.BitmapEffect>
                        </TextBlock>
                        <TextBlock Text="{Binding Text}" Margin="0 0 5 0" TextWrapping="Wrap" 
                                   Foreground="White">
                            <TextBlock.BitmapEffect>
                                <OuterGlowBitmapEffect
                                    GlowSize="5.0"
                                    GlowColor="Black"
                                    Opacity="1.0"/>
                            </TextBlock.BitmapEffect>
                        </TextBlock>
                        <TextBlock Text="{Binding Path=Count, StringFormat=0票}"
                                   Foreground="White">
                            <TextBlock.BitmapEffect>
                                <OuterGlowBitmapEffect
                                    GlowSize="5.0"
                                    GlowColor="Black"
                                    Opacity="1.0"/>
                            </TextBlock.BitmapEffect>
                        </TextBlock>
                    </WrapPanel>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </Grid>
</Window>
